import request from '@/utils/request'

// 查询证书管理列表
export function certList(query) {
  return request({
    url: '/system/cert/list',
    method: 'get',
    params: query
  })
}



// 新增证书管理
export function certAdd(data) {
  return request({
    url: '/system/cert',
    method: 'post',
    data: data
  })
}
export function certEdit(data) {
  return request({
    url: '/system/cert',
    method: 'put',
    data: data
  })
}
export function certDel(data) {
  return request({
    url: '/system/cert/' + data,
    method: 'DELETE',
    data: data
  })
}
export function certInfo(data) {
  return request({
    url: '/system/cert/' + data,
    method: 'get',
  })
}
export function statusChange(id, status) {
  return request({
    url: '/system/cert/' + id + '/' + status,
    method: 'get',
  })
}

// 更新资质记录列表
export function updateLog(query) {
  return request({
    url: '/system/cert/updateLog/' + query.id,
    method: 'get',
    params: query
  })
}

// 查询证书缴费记录列表
export function payLogList(query) {
  return request({
    url: '/system/cert/payLogList',
    method: 'get',
    params: query
  })
}
export function listSelect() {
  return request({
    url: '/system/cert/listSelect/',
    method: 'get',
  })
}
export function isTopChange(id, status) {
  return request({
    url: '/system/cert/isTopChange/' + id + '/' + status,
    method: 'get',
  })
}
export function showChange(id, status) {
  return request({
    url: '/system/cert/showChange/' + id + '/' + status,
    method: 'get',
  })
}
export function setAdvShow(certId, isShow) {
  return request({
    url: '/system/cert/setAdvShow?certId=' + certId + '&isShow=' + isShow,
    method: 'get',
  })
}